using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ibba.agil.core;
using ibba.agil.core.common;

namespace ibba.agil.data.data
{
    public class tbagi032TipoCnfgCamo_ENT : EntityData, IDataEntity
    {
        private manager.tbagi032TipoCnfgCamo_MNG _manager;

        #region Data

        public string codTipoCnfgCamo { get; set; }
        public string desTipoCnfgCamo { get; set; }


        #endregion

        /// <summary>
        /// Construtor necessario para configura��o dos mapeamentos :: Entidade < -- > TABELA
        /// </summary>
        public tbagi032TipoCnfgCamo_ENT()
        {
            // determina o mapeamento entre a tabela e entidade
            base.MapperTable = new Dictionary<string, string>() { { this.GetType().Name, "dbo.TBAGI032_TIPO_CNFG_CAMO" } };

            // determina o mapeamento entre a coluna da tabela e propriedade
            base.Mapper = new Dictionary<string, string>() { 
                     {"codTipoCnfgCamo", "COD_TIPO_CNFG_CAMO"    }, 
                     {"desTipoCnfgCamo", "DES_TIPO_CNFG_CAMO"    }          
            };

            // determina o mapeamento das chaves
            base.MapperKeys = new Dictionary<string, string>()
            {
                //DictionaryEntityKey//
            };

            // determina se a chave � identity
            //base.MapperKeyIsNotIdentity = false;

            // instancia o manager
            _manager = new manager.tbagi032TipoCnfgCamo_MNG();
        }

        public override void Save()
        {
            _manager.Save(this);
        }

        public override void Save(TransactionManager transactionContext)
        {
            _manager.Save(this, transactionContext);
        }

        public override void Delete()
        {
            _manager.Delete(this);
        }

        public override void Delete(TransactionManager transactionContext)
        {
            throw new NotImplementedException();
        }
    }
}
